package cn.ex.ymcc.domain;

import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author aze
 * @since 2022-07-25
 */
@TableName("t_media_file")
@Data
public class MediaFile extends Model<MediaFile> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    @TableField("file_id")
    private String fileId;
    @TableField("file_name")
    private String fileName;
    @TableField("file_original_name")
    private String fileOriginalName;
    @TableField("file_url")
    private String fileUrl;
    @TableField("file_path")
    private String filePath;
    @TableField("file_type")
    private String fileType;
    @TableField("file_status")
    private Integer fileStatus; //1未处理 2处理成功 3处理失败 4无需处理
    @TableField("file_size")
    private Long fileSize;
    @TableField("mime_type")
    private String mimeType;
    @TableField("upload_time")
    private Date uploadTime;

    @TableField("chapter_id")
    private Long chapterId;

    @TableField("course_id")
    private Long  courseId;

    private int number = 1;
    //视频名
    private String name;
    //课程名
    @TableField("course_name")
    private String courseName;
    //章节名
    @TableField("chapter_name")
    private String chapterName;
    @TableField("time_minute")
    private String timeMinute;

    private boolean free;

    //hls处理
    @TableField(exist = false)
    private MediaFileProcess_m3u8 mediaFileProcess_m3u8;

    public void setNumber(int number){
        this.number = number;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }


    @Override
    protected Serializable pkVal() {
        return this.id;
    }


}
